home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / flysdk / plugin / walk / jumppad.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-07  |  609 b   |  40 lines

  1. #include "walk.h"
  2.  
  3. void jump_pad::init()
  4. {
  5.     if (objmesh)
  6.         pos=objmesh->pivotpos;
  7. }
  8.  
  9. int jump_pad::get_custom_param_desc(int i,param_desc *pd)
  10. {
  11.     if (pd==0)
  12.         return 4;
  13.     else 
  14.     switch(i)
  15.     {
  16.         case 0:
  17.             pd->type='f';
  18.             pd->data=&jumpforce;
  19.             strcpy(pd->name,"jumpforce");
  20.             break;
  21.         case 1:
  22.             pd->type='i';
  23.             pd->data=&forcetime;
  24.             strcpy(pd->name,"forcetime");
  25.             break;
  26.         case 2:
  27.             pd->type='i';
  28.             pd->data=&invert;
  29.             strcpy(pd->name,"invert");
  30.             break;
  31.         case 3:
  32.             pd->type='3';
  33.             pd->data=&objmesh;
  34.             strcpy(pd->name,"mesh");
  35.             break;
  36.     }
  37.     return 0;
  38. }
  39.  
  40.